package com.baiyi.homeui.hshomeui.entity;

import android.text.TextUtils;

import com.baiyi.homeui.hshomeui.manage.MsgReceiverManager;

public class PcGpu {


    private int load;
    private int fan;
    private String temperature;
    private int speed;
    private int power;

    private float voltage;

    public float getVoltage() {
        return voltage;
    }

    public void setVoltage(float voltage) {
        this.voltage = voltage;
    }

    public int getLoad() {
        return load;
    }

    public void setLoad(int load) {
        this.load = load;
    }

    public int getFan() {
        return fan;
    }

    public void setFan(int fan) {
        this.fan = fan;
    }

    public String getTemperature() {
        if(!TextUtils.isEmpty(MsgReceiverManager.temp_unit)&&MsgReceiverManager.temp_unit.equals("Fahrenheit")){
            return (int)((Float.parseFloat(temperature) *1.8) + 32)+"";
        }
        return (int)(Float.parseFloat(temperature))+"";
    }

    public void setTemperature(String temperature) {
        this.temperature = temperature;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    public int getPower() {
        return power;
    }

    public void setPower(int power) {
        this.power = power;
    }

    @Override
    public String toString() {
        return "PcGpu{" +
                "load=" + load +
                ", fan=" + fan +
                ", temperature='" + temperature + '\'' +
                ", speed=" + speed +
                ", power=" + power +
                ", voltage=" + voltage +
                '}';
    }
}
